
package com.turing.data.service.excel.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.turing.data.dao.excel.ExportFieldMapper;
import com.turing.data.model.domain.excel.ExportField;
import com.turing.data.service.excel.ExportFieldService;
import lombok.AllArgsConstructor;

/**
 * @Description 导出字段映射表服务类实现
 * @Author lcy
 * @Date 2021-08-09
 */
@Service
@AllArgsConstructor
public class ExportFieldServiceImpl extends ServiceImpl<ExportFieldMapper, ExportField> implements ExportFieldService {

    @Override
    public List<ExportField> getByTemplateId(String templateId) {
        LambdaQueryWrapper<ExportField> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(ExportField::getTemplateId, templateId).orderByAsc(ExportField::getTemplateId);
        return this.list(queryWrapper);
    }
}
